// Tags:
#include <cctype>
#include <cstdio>
#include <cstring>

typedef unsigned int uint;

template <typename T>
inline T &read(T &x) {
  x = 0;
  short ch = getchar();
  while (!isdigit(ch)) { ch = getchar(); }
  while (isdigit(ch)) x = (x << 1) + (x << 3) + (ch ^ '0'), ch = getchar();
  return x;
}

const uint N = 100, mod = 1e9 + 7;
uint n, m, a, b, f[N][N][N][2], ans;

inline void add(uint &x, uint y) {
  if ((x += y) >= mod) x -= mod;
}

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen64("/tmp/CodeTmp/testdata.in", "r", stdin);
  freopen64("/tmp/CodeTmp/testdata.out", "w", stdout);
#else
  freopen("treat.in", "r", stdin);
  freopen("treat.out", "w", stdout);
#endif
#endif

  read(n), read(m), read(a), read(b);
  for (uint i = 1; i <= a; ++i) {
    memset(f, 0, sizeof(f));
    f[i][0][i][0] = 1;
    for (uint j = i; j <= n; ++j) {
      for (uint k = 0; k <= m; ++k) {
        for (uint h = 1; h < a; ++h) {
          add(f[j + 1][k][h + 1][0], f[j][k][h][0]);
          add(f[j][k + 1][1][1], f[j][k][h][0]);
        }
        add(f[j][k + 1][1][1], f[j][k][a][0]);
        for (uint h = 1; h < b; ++h) {
          add(f[j][k + 1][h + 1][1], f[j][k][h][1]);
          add(f[j + 1][k][1][0], f[j][k][h][1]);
        }
        add(f[j + 1][k][1][0], f[j][k][b][1]);
      }
    }
    for (uint j = 1; j <= b; ++j) add(ans, f[n][m][j][1]);
    for (uint j = 1; j <= a - i; ++j) add(ans, f[n][m][j][0]);
  }
  for (uint i = 1; i <= b; ++i) {
    memset(f, 0, sizeof(f));
    f[0][i][i][1] = 1;
    for (uint j = 0; j <= n; ++j) {
      for (uint k = i; k <= m; ++k) {
        for (uint h = 1; h < a; ++h) {
          add(f[j + 1][k][h + 1][0], f[j][k][h][0]);
          add(f[j][k + 1][1][1], f[j][k][h][0]);
        }
        add(f[j][k + 1][1][1], f[j][k][a][0]);
        for (uint h = 1; h < b; ++h) {
          add(f[j][k + 1][h + 1][1], f[j][k][h][1]);
          add(f[j + 1][k][1][0], f[j][k][h][1]);
        }
        add(f[j + 1][k][1][0], f[j][k][b][1]);
      }
    }
    for (uint j = 1; j <= a; ++j) add(ans, f[n][m][j][0]);
    for (uint j = 1; j <= b - i; ++j) add(ans, f[n][m][j][1]);
  }
  printf("%d", ans);
  return 0;
}